==========================================================================================
= Melissa Data Extended Stored Procedure Address Object Microsoft SQL Server 2000 Sample =
==========================================================================================

*DISCLAIMER*
================
We do not support 32-bit versions of SQL Server due to memory constraints

Prerequisite
====================
This sample is intended for use after the installation of the DQT Suite DVD. It requires that 
the Address Object is registered and the Data Files installed. If you did not install the Data Files
to its default directory, you will have to change the Data File Path in the sample code to point it
to the correct directory. The Data Files Directory must contain the following files: mdAddr.dat, 
mdAddr.lic, mdAddr.nat and mdAddr.str.

SQL Server/Windows Sample Scripts
=================================
The sample scripts were built for versions of SQL Server 2005 and higher.

Demo Mode
=================
The sample will verify or look up Nevada addresses while it is in Demo mode. To unlock Address Object for all
of the United States and Canada (add-on), you will need a valid license string. You must call our Sales Department to 
obtain a valid license string. mdAddr.lic does not contain the license string and should not be opened by the customer.

Installation
=============

To use the mdAddr Extended Stored Procedures (XPs) and/or User Defined
Functions (UDFs), you must first install the API. To do so, follow the
following steps:


1. Install the Address Object on the machine running SQL Server, not the local
	workstation. The stored procuedre runs on the server, so the Address
	Object has to be registered where the stored procedure will run.

2. Copy mdAddr.dll into SQL Server's Binn folder. This is usually located in
   	\Program Files\Microsoft SQL Server\90\Tools\Binn. If you are replacing an
   	existing copy of this file, you MUST stop SQL Server before doing so, or the
   	file will not be properly copied. Be sure to use the proper version of the
   	DLL depending on your version of SQL Server. If  you are using SQL Server
	x64, please use the 64bit version of mdAddr.dll.

3. Run the xp_mdAddr.sql script. This will add the mdAddr Extended Stored
   	Procedures to SQL Server.

4. Run the UDF_mdAddr.sql script. This will add the mdAddr User Defined
   	Functions to SQL Server.

5. Start up SQL Query Analzyer and change over to some database. Northwind
	is a sample database to have, but you can pick any database.

3. Open up the file CreateList.SQL and copy the contents to the Query
	window - Execute the script.

4. Open up the file AddressObject_XP.SQL and copy the contents to the Query
	window. 

5. Change the path in the line of code listed below to where you installed
	the data files:

	SET  @DataPath = 'C:\Program Files\Melissa DATA\DQT\Data' -- Path of Address Object data files

   The Data Files Directory must contain the following files: mdAddr.dat,
	mdAddr.lic, mdAddr.nat and mdAddr.str.
	
5. Run the stored procedure with the command exec sp_VerifyAddress.

6. Examine the records in the List Table (Select * from List).  When newly
	created, they had no plus 4's and now most records will have
	plus4's.  We do not code all records in the table, as we wanted to
	demo error codes that could be returned as well.


SALES AND SUPPORT
=================
For free technical support please call us at 800-MELISSA ext. 4
(800-635-4772 ext. 4) or email us at tech@MelissaData.com.

To purchase Address Object, please contact our sales department at
800-MELISSA ext. 3 (800-800-6245 ext. 3).


COPYRIGHT NOTICE
================
(C) 2011 Melissa Data Corporation. All rights reserved.

Address Object is a trademark and 1-800-800-MAIL is a registered trademark
of Melissa Data Corporation. UNIX is a registered trademark of The Open
Group. Linux is a registered trademark of Linus Torvalds.  Solaris is
a trademark of Sun Microsystems. Windows is a registered trademark of
Microsoft Corporation.

All other brands and products are trademarks of their respective
holder(s).